/*
 Navicat Premium Data Transfer

 Source Server         : demo
 Source Server Type    : MySQL
 Source Server Version : 80031
 Source Host           : localhost:3306
 Source Schema         : student_month

 Target Server Type    : MySQL
 Target Server Version : 80031
 File Encoding         : 65001

 Date: 06/10/2023 16:03:21
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for apartment
-- ----------------------------
DROP TABLE IF EXISTS `apartment`;
CREATE TABLE `apartment` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of apartment
-- ----------------------------
BEGIN;
INSERT INTO `apartment` (`id`, `name`) VALUES (1, '上地5号楼');
INSERT INTO `apartment` (`id`, `name`) VALUES (2, '上地3号楼');
INSERT INTO `apartment` (`id`, `name`) VALUES (3, '北辰5号楼');
INSERT INTO `apartment` (`id`, `name`) VALUES (4, '北辰3号楼');
INSERT INTO `apartment` (`id`, `name`) VALUES (5, '北辰1号楼');
COMMIT;

-- ----------------------------
-- Table structure for room
-- ----------------------------
DROP TABLE IF EXISTS `room`;
CREATE TABLE `room` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `pic` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of room
-- ----------------------------
BEGIN;
INSERT INTO `room` (`id`, `name`, `pic`) VALUES (1, '101', 'https://foruda.gitee.com/avatar/1695113588109380793/12065236_hccxx_1695113588.png');
INSERT INTO `room` (`id`, `name`, `pic`) VALUES (2, '201', 'https://foruda.gitee.com/avatar/1695113588109380793/12065236_hccxx_1695113588.png');
INSERT INTO `room` (`id`, `name`, `pic`) VALUES (3, '301', 'https://foruda.gitee.com/avatar/1695113588109380793/12065236_hccxx_1695113588.png');
INSERT INTO `room` (`id`, `name`, `pic`) VALUES (4, '401', 'https://foruda.gitee.com/avatar/1695113588109380793/12065236_hccxx_1695113588.png');
INSERT INTO `room` (`id`, `name`, `pic`) VALUES (5, '501', 'https://foruda.gitee.com/avatar/1695113588109380793/12065236_hccxx_1695113588.png');
COMMIT;

-- ----------------------------
-- Table structure for student
-- ----------------------------
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of student
-- ----------------------------
BEGIN;
INSERT INTO `student` (`id`, `name`) VALUES (1, '张三');
INSERT INTO `student` (`id`, `name`) VALUES (2, '李四');
INSERT INTO `student` (`id`, `name`) VALUES (3, '王五');
INSERT INTO `student` (`id`, `name`) VALUES (4, 'tom');
INSERT INTO `student` (`id`, `name`) VALUES (5, 'jerry');
INSERT INTO `student` (`id`, `name`) VALUES (6, '王一博');
INSERT INTO `student` (`id`, `name`) VALUES (7, '蔡徐坤');
INSERT INTO `student` (`id`, `name`) VALUES (8, '张艺兴');
INSERT INTO `student` (`id`, `name`) VALUES (9, '吴亦凡');
INSERT INTO `student` (`id`, `name`) VALUES (10, '马斯克');
INSERT INTO `student` (`id`, `name`) VALUES (11, '川普');
INSERT INTO `student` (`id`, `name`) VALUES (12, '普京');
INSERT INTO `student` (`id`, `name`) VALUES (13, '马云');
INSERT INTO `student` (`id`, `name`) VALUES (14, '马化腾');
COMMIT;

-- ----------------------------
-- Table structure for student_room
-- ----------------------------
DROP TABLE IF EXISTS `student_room`;
CREATE TABLE `student_room` (
  `id` int NOT NULL AUTO_INCREMENT,
  `student_id` int DEFAULT NULL,
  `room_id` int DEFAULT NULL,
  `apartment_id` int DEFAULT NULL,
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_sid_rid_aid` (`student_id`,`room_id`,`apartment_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of student_room
-- ----------------------------
BEGIN;
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (1, 1, 1, 1, '2023-04-10 09:11:16');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (2, 2, 1, 1, '2023-04-09 09:11:39');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (3, 3, 3, 3, '2023-04-10 09:11:53');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (4, 4, 2, 2, '2023-04-08 09:21:26');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (5, 5, 5, 5, '2023-04-09 09:21:30');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (6, 6, 4, 1, '2023-04-10 15:35:09');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (7, 7, 4, 1, '2023-04-10 15:35:25');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (9, 9, 3, 5, '2023-05-12 14:26:46');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (10, 8, 3, 5, '2023-05-12 14:27:07');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (11, 10, 3, 5, '2023-06-07 16:14:44');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (12, 11, 4, 1, '2023-07-06 16:04:36');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (15, 12, 1, 1, '2023-08-03 16:13:02');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (16, 13, 1, 1, '2023-08-31 16:06:56');
INSERT INTO `student_room` (`id`, `student_id`, `room_id`, `apartment_id`, `create_time`) VALUES (17, 14, 3, 3, '2023-10-06 15:52:58');
COMMIT;

-- ----------------------------
-- Table structure for user_info
-- ----------------------------
DROP TABLE IF EXISTS `user_info`;
CREATE TABLE `user_info` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `salt` varchar(255) DEFAULT NULL,
  `nick_name` varchar(255) DEFAULT NULL,
  `avatar_url` varchar(255) DEFAULT NULL,
  `gitee_id` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb3;

-- ----------------------------
-- Records of user_info
-- ----------------------------
BEGIN;
INSERT INTO `user_info` (`id`, `name`, `password`, `salt`, `nick_name`, `avatar_url`, `gitee_id`) VALUES (11, 'admin', 'af1fcb1697651cd84003e499ce947ee3', '64826ae1', 'Ikun', 'https://foruda.gitee.com/avatar/1695113588109380793/12065236_hccxx_1695113588.png', 12065236);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
